import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 客户、管理端路由注入
import clientCfg from './router_client'
import managerCfg from './router_manager'

//共用父页面
const aboutUs = resolve => require(['../views/general/aboutUs'], resolve)
const disclaim = resolve => require(['../views/general/disclaim'], resolve)
const welcome = resolve => require(['../views/client/welcome'], resolve)

let routes = [
  {path: '/',name:'redirectWelcome',component:welcome},
  {path: '/aboutUs',name:'aboutUs',component:aboutUs},
  {path: '/disclaim',name:'disclaim',component:disclaim},
  // { path: '*', redirect: '/' }//重定向任意未匹配路径到/main
]
routes = _.union(routes, clientCfg, managerCfg)

export default new VueRouter({
  routes
});

